package com.ygqh.baby.service.wechat.model;

import com.alibaba.fastjson.annotation.JSONField;

public class Action {

	@JSONField(name = "user_action_set_id")
	private String userActionSetId;

	@JSONField(name = "url")
	private String url;

	@JSONField(name = "action_time")
	private Integer actionTime;

	@JSONField(name = "action_type")
	private ActionType actionType;

	@JSONField(name = "trace")
	private Trace trace;

	@JSONField(name = "action_param")
	private ActionParam actionParam;

	public String getUserActionSetId() {
		return userActionSetId;
	}

	public void setUserActionSetId(String userActionSetId) {
		this.userActionSetId = userActionSetId;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public Integer getActionTime() {
		return actionTime;
	}

	public void setActionTime(Integer actionTime) {
		this.actionTime = actionTime;
	}

	public ActionType getActionType() {
		return actionType;
	}

	public void setActionType(ActionType actionType) {
		this.actionType = actionType;
	}

	public Trace getTrace() {
		return trace;
	}

	public void setTrace(String clickId) {
		this.trace = new Trace(clickId);
	}

	public ActionParam getActionParam() {
		return actionParam;
	}

	public void setActionParam(Integer value) {
		this.actionParam = new ActionParam(value);
	}

	/**
	 * 微信广告转化行为
	 * @author Ss
	 *
	 */
	public static enum ActionType {
		
		COMPLETE_ORDER(0, "下单"), RESERVATION(1, "表单预约");
	
		/** 状态码 */
		private Integer code;
		/** 状态名称 */
		private String title;
	
		ActionType(Integer code, String title) {
			this.code = code;
			this.title = title;
		}
	
		public Integer getCode() {
			return code;
		}
	
		public void setCode(Integer code) {
			this.code = code;
		}
	
		public String getTitle() {
			return title;
		}
	
		public void setTitle(String title) {
			this.title = title;
		}
		
	}

	public static class Trace {
	
		@JSONField(name = "click_id")
		private String clickId;
	
		public Trace(String clickId) {
			super();
			this.clickId = clickId;
		}
	
		public String getClickId() {
			return clickId;
		}
	
		public void setClickId(String clickId) {
			this.clickId = clickId;
		}
		
	}

	public static class ActionParam {
	
		@JSONField(name = "value")
		private Integer value;
	
		public ActionParam(Integer value) {
			super();
			this.value = value;
		}
	
		public Integer getValue() {
			return value;
		}
	
		public void setValue(Integer value) {
			this.value = value;
		}
		
	}

}
